package com.crm.service.before_sale;

import com.crm.pojo.Offer;
import com.crm.pojo.OfferDetail;
import com.crm.vo.OfferDetailsVO;
import com.crm.vo.Result;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface OfferService {
    /**
     * 根据id删除报价
     * @param ofId
     * @return
     */
    public Result deleteOfferById(Long ofId);

    /**
     * 分页展示报价表
     * @param offer
     * @param curpage
     * @param pagesize
     * @param minTotalMoney
     * @param maxTotalMoney
     * @param updateStartTime
     * @param updateEndTime
     * @return
     */
    public List<Offer> showOfferList(Offer offer, int curpage, int pagesize,
                                     BigDecimal minTotalMoney, BigDecimal maxTotalMoney,
                                     Date updateStartTime, Date updateEndTime);

    /**
     * 获取报价总数量
     * @param offer
     * @param minTotalMoney
     * @param maxTotalMoney
     * @param updateStartTime
     * @param updateEndTime
     * @return
     */
    public Long getOfferCount(Offer offer, BigDecimal minTotalMoney, BigDecimal maxTotalMoney,
                              Date updateStartTime, Date updateEndTime);

    /**
     * 展示一个报价对应的报价明细
     * @param ofId
     * @return
     */
    public List<OfferDetailsVO> getOfferDetailsVOList(Long ofId);

    /**
     * 添加报价
     * @param allOffer
     * @param chanceId
     * @param checkState
     * @param clientId
     * @param contactId
     * @param date
     * @param ofNo
     * @param ofType
     * @param theme
     * @param userId
     * @return
     */
    public Result addOffer(BigDecimal allOffer,BigDecimal chanceId,String checkState,BigDecimal clientId,BigDecimal contactId,Date date,
                          String ofNo,String ofType,String theme,BigDecimal userId);

    /**
     * 添加报价明细
     * @param offerDetail
     * @param id
     */
    public void addOfferDetails(OfferDetail offerDetail,Long id);

    /**
     * 根据id获取一条报价明细
     * @param deId
     * @return
     */
    public OfferDetailsVO getOneOfferDetail(Long deId);

    /**
     * 编辑报价
     * @param offer
     * @return
     */
    public Result editOffer(Offer offer);

    /**
     * 保存修改的报价明细
     * @param offerDetail
     * @return
     */
    public OfferDetail saveOfferDetail(OfferDetail offerDetail);

}



